|
SET OBJECT ROTATION ZYX
This command will reverse the order of rotation for the specified object.
SET OBJECT ROTATION ZYX Object Number
Object Number
Integer
The object number
This command does not return a value.
The angles of rotation will transform the object first around the Z axis, then the Y axis and finally the X axis. The parameter should be specified using an integer value.
hide mouse:cls 0:autocam off
ObjectNumber=1
SecondObject=2
ImageNumber=1
make object sphere SecondObject,1
load object "models\model.x",ObjectNumber
load image "iron.jpg",ImageNumber
append object "models\extraanim.x", ObjectNumber, total object frames(ObjectNumber)+1
set object interpolation ObjectNumber,50
position object ObjectNumber,0,0,0
position object SecondObject,0,0,0
position camera 0,2,4
point camera 0,0,0
while mouseclick()=0
set cursor 0,0
print "press y to rotate object on the x"
if inkey$()="y" then rotate object ObjectNumber,object angle x(ObjectNumber)+1,object angle y(ObjectNumber),object angle z(ObjectNumber)
print "press u to rotate object on the z"
if inkey$()="u" then rotate object ObjectNumber,object angle x(ObjectNumber),object angle y(ObjectNumber),object angle z(ObjectNumber)+1
print "press i to set object rotation xyz"
if inkey$()="i" then set object rotation xyz ObjectNumber
print "press o to set object rotation zyx"
if inkey$()="o" then set object rotation zyx ObjectNumber
print "press up arrow key"
if upkey()=1 then move camera 1:while scancode()<>0:endwhile
print "press down arrow key"
if downkey()=1 then move camera -1:while scancode()<>0:endwhile
print "press left arrow key"
if leftkey()=1 then turn camera left 1
print "press right arrow key"
if rightkey()=1 then turn camera right 1
endwhile
while mouseclick()=1:endwhile
if object exist(ObjectNumber)=1 then delete object ObjectNumber
if object exist(SecondObject)=1 then delete object SecondObject
if image exist(ImageNumber)=1 then delete image ImageNumber
end
BASIC3D Commands Menu
Index
|